package com.itheima.interceptor;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        //如果这句话打印了表示该方法访问被拦截了
        System.out.println("UserInterceptor拦截器的preHandle方法执行了..."+request.getRequestURI());
        //放行
        return true;
    }
}
